RCG B2C Customers System API - Implementation Template
Data mappings
This document provides information generated from the DataWeave scripts included in the project, such as function definitions, variable definitions, and data mapping tables.
Module | Description |
---|---|
add-customer-address | B2C add customer address mapping |
CimMapping | B2C customer to CIM customer format |
customer-address-update | B2C customer Address mapping |
customer-profile-update | B2C customer Profile update mapping |
register-customer | B2C customer register customer mapping |
retrieve-customers-mapping | B2C retrieve customers mapping |
update-customer-masterpartyroleId | B2C update customer Master party role Id mapping |
add-customer-address
B2C add customer address mapping
Source:
./src/main/resources/dwl/add-customer-address.dwl
Mapping Tables
Maps CIM customer format to B2C Customer Address mapping
B2C | CIM | Description |
---|---|---|
address1 | party.addressLine1 | The Address of the customer |
address2 | party.address.addressLine2 | The Address of the customer |
addressId | party.name | The Address Id of the customer |
city | party.cityName | The customer city name |
countryCode | US | The country code of the customer defaulted to US |
firstName | party.firstName | The FirstName of the customer |
fullName | party.personName | The full name of the customer |
creationDate | todays date time | Hardcoded to Todays date |
lastModified | todays date time | The Hardcoded to Todays date |
lastName | party.lastName | The Last name of the customer |
postalCode | party.postalCodeText | The Postal code of the customer |
preferred | true | defaulted to true |
stateCode | address.stateProvinceName | The State code of the customer |
phone | address.contactPhone | The phone number of the customer |
CimMapping
B2C customer to CIM customer format
Source:
./src/main/resources/dwl/CimMapping.dwl
Functions
fun enrichCimData (ccResponse)
Maps B2C customer to CIM customer format
CIM | B2C customer | Description | ||
---|---|---|---|---|
customerStatus | credentials.enabled | returns boolean if true ACTIVE else INACTIVE | ||
customerNumber | customerNo | The customer number | ||
partyRoleType | Customer | The partyRoleType Hardcoded as Customer | ||
party.id | customerNo | The customerNo | ||
party.partyType | Individual | Hardcoded as Individual | ||
party.firstName | firstName | The first name of the customer | ||
party.lastName | lastName | The last name of the customer | ||
party.externalIds.id | null | The Id is hardcoded as null | ||
party.externalIds.externalIds | customerNo | The customer number | ||
party.externalIds.externalIdType | SALESFORCE_B2C | The externalId is of the SALESFORCE_B2C | ||
party.externalIds.status | VALID | The status of the customer set to VALID | ||
party.externalIds.id | null | The Id is hardcoded as null | ||
party.externalIds.externalIds | c_masterPartyRoleId | The Master Id | ||
party.externalIds.externalIdType | MDM | The externalId is of the MDM | ||
party.externalIds.status | VALID | The status of the customer set to VALID | ||
party.contactPoints.id | null | Hardcoded contact point Id to null | ||
party.contactPoints.contactPointType | ContactPointEmail | Hardcoded the contactPointType to ContactPointEmail | ||
party.contactPoints.activeFromDate | creationDate | creationDate to "yyyy-MM-dd" | ||
party.contactPoints.emailAddress | The email address of the customer | |||
party.contactPoints.id | primaryAddress.addressId | Address Id of the customer | ||
party.contactPoints.contactPointType | ContactPointAddress | Hardcoded the contactpointtype to ContactPointAddress | ||
party.contactPoints.activeFromDate | creationDate | creationDate to "yyyy-MM-dd" | ||
party.contactPoints.addressLine1 | primaryAddress.address1 | The Address of the customer | ||
party.contactPoints.countryName | primaryAddress.countryCode | The country code of the customer | ||
party.contactPoints.cityName | primaryAddress.city | The city of the customer | ||
party.contactPoints.stateProvinceName | primaryAddress.stateCode | The state code of the customer | ||
party.contactPoints.cityName | primaryAddress.city | The city of the customer | ||
party.contactPoints.postalCodeText | primaryAddress.postalCode | The Postal code of the Individual | ||
party.contactPoints.contactPhone | primaryAddress.phone | The phone number of the Individual | ||
party.contactPoints.id | null | Hardcoded contact point Id to null | ||
party.contactPoints.contactPointType | ContactPointPhone | Hardcoded the ContactPointPhone to ContactPointEmail | ||
party.contactPoints.activeFromDate | creationDate | creationDate to "yyyy-MM-dd" | ||
party.contactPoints.telephoneNumber | telephoneNumber | The telephoneNumber of the Individual | ||
party.contactPoints.primaryPhoneType | type | Describes the type of like Business | Home | Mobile |
externalIds.id | null | The Id is hardcoded as null | ||
externalIds.externalIds | customerNo | The customer number | ||
externalIds.externalIdType | SALESFORCE_B2C | The externalId is of the SALESFORCE_B2C | ||
externalIds.status | VALID | The status of the customer set to VALID | ||
externalIds.id | null | The Id is hardcoded as null | ||
externalIds.externalIds | c_masterPartyRoleId | The Master Id | ||
externalIds.externalIdType | MDM | The externalId is of the MDM | ||
externalIds.status | VALID | The status of the customer set to VALID | ||
auditInfo.isDeleted | false | Indicates whether or not the entity has been deleted defaulted to false | ||
auditInfo.createdBy | accelerator-b2c-customer-sys-api | Hardcoded to accelerator-b2c-customer-sys-api | ||
auditInfo.updatedBy | accelerator-b2c-customer-sys-api | Hardcoded to accelerator-b2c-customer-sys-api | ||
auditInfo.updatedDate | lastModified | The last Modified date of the customer | ||
auditInfo.createdDate | creationDate | The creation Date of the customer |
customer-address-update
B2C customer Address mapping
Source:
./src/main/resources/dwl/customer-address-update.dwl
Mapping Tables
Maps CIM customer format to B2C Customer Address mapping
B2C | CIM | Description |
---|---|---|
address1 | address.addressLine1 | The Address of the customer |
address2 | address.addressLine2 | The Address of the customer |
addressId | addressId | The Address Id of the customer |
city | address.cityName | The customer city name |
countryCode | US | The country code of the customer defaulted to US |
firstName | party.firstName | The FirstName of the customer |
lastName | party.lastName | The LastName of the customer |
postalCode | address.postalCodeText | The Postal code of the customer |
stateCode | address.stateProvinceName | The State code of the customer |
customer-profile-update
B2C customer Profile update mapping
Source:
./src/main/resources/dwl/customer-profile-update.dwl
Mapping Tables
Maps CIM customer format to B2C Customer profile update mapping
B2C | CIM | Description |
---|---|---|
customerNo | customerId | The customer unique id |
firstName | party.firstName | The FirstName of the customer |
lastName | party.lastName | The LastName of the customer |
emailAddress | The email Address of the customer contactPointType matches ContactPointEmail | |
creationDate | auditInfo.createdDate | The customer creation date |
lastModified | auditInfo.updatedDate | The customer last modified by date |
c_masterPartyRoleId | externalIds.externalId | when externalIdType matches MDM |
phoneHome | telephoneNumber | Telephone number of the customer when name matches phoneHome |
phoneBusiness | telephoneNumber | Telephone number of the customer when name matches phoneBusiness |
phoneMobile | telephoneNumber | The Telephone number of customer when name matches phoneMobile |
register-customer
B2C customer register customer mapping
Source:
./src/main/resources/dwl/register-customer.dwl
Mapping Tables
Maps CIM customer format to B2C Customer register mapping
B2C | CIM | Description |
---|---|---|
customer.email | The Email id of the customer | |
customer.firstName | party.firstName | The First name of the customer |
customer.lastName | party.lastName | The First name of the customer |
customer.login | The Email id of the customer | |
customer.customerNo | customerNumber | The Email id of the customer |
customer.phoneHome | telephoneNumber | Telephone number of the customer when name matches phoneHome |
customer.phoneBusiness | telephoneNumber | Telephone number of the customer when name matches phoneBusiness |
customer.phoneMobile | telephoneNumber | The Telephone number of customer when name matches phoneMobile |
password | random password | The password for customer registration |
retrieve-customers-mapping
B2C retrieve customers mapping
Source:
./src/main/resources/dwl/retrieve-customers-mapping.dwl
Mapping Tables
Maps CIM customer format to B2C customer mapping
B2C | CIM | Description |
---|---|---|
limit | limit | The Limit queryparams |
offset | offset | The First name of the customer |
query.textQuery.fields | queryParams | Query Params passed in request |
query.textQuery.searchPhrase | queryParams | Query Params passed in request |
update-customer-masterpartyroleId
B2C update customer Master party role Id mapping
Source:
./src/main/resources/dwl/update-customer-masterpartyroleId.dwl
Mapping Tables
Maps CIM customer format to B2C customer mapping
B2C | CIM | Description |
---|---|---|
customerNo | customerRegistrationResponse.customerNo | The Limit queryparams |
lastName | party.lastName | The Last name of the customer |
c_masterPartyRoleId | externalIds.externalId | Master party Id matches MDM |